package cz.data.domain.driver.rpc;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import cz.data.common.base.BaseResponse;
import cz.data.common.support.db.DbProperty;
import cz.data.common.support.db.core.DbColumn;
import cz.data.common.support.db.core.DbTable;
import cz.data.common.support.db.driver.DataOperation;
import cz.data.common.support.db.driver.TableOperation;

import java.util.List;

public interface IDriverFeign {

    BaseResponse connect(DbProperty property);

    Boolean createTable(TableOperation operation);

    Boolean dropTable(TableOperation operation);

    List<DbTable> getSourceAllTable(String sourceId);

    List<DbColumn> getSourceTableColumns(String sourceId, String tableName);

    JSONObject getDataById(DataOperation operation);

    Page<JSONObject> getPageData(DataOperation operation);

    Boolean insertData(DataOperation operation);

    Boolean updateData(DataOperation operation);

    Boolean removeData(DataOperation operation);
}
